let fs=require('fs');

fs.mkdir('./test',function(err){
	if(err){
		return console.error(err);
	}
	console.log('dir created');
});
setTimeout(()=>{
	fs.rmdir('test',function(err){
		if(err){
			return console.log(err);
		}
		console.log('dir deleted');
	});
},1000);

fs.readdir('.',function(err,files){
	if(err){
		throw err;
	}
	console.log('Files in current directory: ',files);
});
